1. Field of the Invention
The present invention relates to a method, system, and program for dynamically linking to data when copies are maintained at different storage locations and, in network environments, linking to an alternate server including a copy of the data.
2. Description of the Related Art
In a client/server network environment, data is distributed at different storage locations. Users accessing files or database records will use a fixed file path name to access the data. There are many software techniques used in the art for allowing users to access or link to a document at a distributed location, such as a file server. In the Internet context, a hypertext link may be embedded in a Hypertext Markup Language (HTML) document that provides a Universal Resource Locator (URL) of the linked document, which is the global address of a document on the World Wide Web. The document may then be retrieved via this hypertext link that uses the address of the document on a server connected to the Internet or World Wide Web. For instance, an HTML page may include hypertext links to other HTML pages of interest.
Further, most WINDOWS applications enable object linking and embedding (OLE) between applications and between documents. Hyptertext linking and embedding is used as a method of sharing data between documents. This allows immediate access to the current version of the linked embedded document. For instance, in the LOTUS NOTES** environment, a document or an e-mail message may contain a document link (doclink) to another document stored at a location in the network. With Lotus Notes, links can be created to documents, views, and databases. Links appear as a graphical representation or icon of a piece of paper with a corner folded down. Associated with each link is a location, called the link pointer, within the link document. When the user double-clicks the link, Lotus Notes displays the link document showing the section of text containing the link pointer. When the user closes the link document, Lotus Notes returns to the original document that contained the link. These links or icons representing the links may be included in e-mails or any other Lotus Notes documents.
The links created in HTML pages, Lotus Notes, and other systems are static links. If the database ID or document ID referenced in the link is available at a different location, then another hypertext link to the new location of the document will have to be created to address the file or data at this new location.
In network systems, especially those distributed world wide, data may be replicated at different server locations. Lotus Notes allows multiple copies of a single file, called replicas, on multiple servers or workstations. This allows users at dispersed locations to access the same data from a local file server. A replica differs from a copy of a file, in that the original file and its replica have the same replica ID number. Replication is the process of sharing changes between replicas. Lotus Notes applies updates to the master copy of the data to the replicas to insure consistency between the replicas and the master copy of the data.
Although replicas of databases may be maintained, when a user activates a link, the linked document is accessed at the server initially specified when the link is created as document addressed by the link is static. i.e., points to the same document. Thus, even if the data is at a more proximate replicated location, the link will access the data at the server initially specified and ignore the presence of the data at a more proximate replica location.
There is thus a need in the art for an improved method, system, and program for providing links to data within documents.
To overcome the limitations in the prior art described above, preferred embodiments disclose a system, method, and program for linking to data from a document that includes a pointer to the data in a first storage device. A first request to access the data addressed by the pointer in the document is processed. Information on alternate storage devices and data therein is processed to determine whether a copy of the data is present in a second storage device. A second request is submitted to access the copy of the data in the second storage device after determining that the information indicates that the second storage device includes the data. The accessed copy of the data, received in response to the second request, is then returned to the first request.
In further embodiments, the document is opened and a user selectable graphical representation of the pointer to the data in the opened document is displayed. In such case, the first request is generated in response to user selection of the graphical representation of the pointer to the data.
In network embodiments, a first computer includes the document including a pointer to data at a second computer. A first request is processed to access the data addressed by the pointer in the document. Information on alternate computers and data therein is processed to determine whether a copy of the data is present in a third computer. The first, second, and third computers communicate over a network. A second request is submitted to the third computer for the copy of the data after determining that the third computer maintains the copy of the data. The accessed copy of the data, received in response to the second request, is returned to the first request.
In further network embodiments, the data is included in a database. The information on alternate computers indicates different domains, servers included in each domain, and at least one database included in each server. In such case, a determination is made of a domain indicated in the information having the same domain as the first computer. A determination is then made as to whether one server in the determined domain that includes a copy of the database including the copy of the data addressed by the pointer in the document. In such case, submitting the second request comprises submitting the second request to the determined server including the copy of the database.
In still further network embodiments, location information may be provided on the location of the alternate computers to allow the selection of a server including the copy of the database that is at the most proximate location to the first computer.
In further embodiments, the information on alternate storage devices and servers may be maintained in the document including the pointer to the data.
Preferred embodiments provide a mechanism for allowing the automatic selection of an alternate location to access data embedded in a document different from the address specified by the link. Typically, when an embedded link to data within a document is processed, the link is static and the same address specified by the link is accessed to retrieve the data. Preferred embodiments provide information that may be used to access the data at a more proximate storage device or network server than the location specified in the link. This provides dynamic smart linking to the closest location that includes the linked data. This invention is especially useful in network environments where data is replicated at servers in dispersed geographical locations. In such environments, the preferred embodiments will automatically access data addressed in a link within a document, such as a hypertext link, from the most proximate geographical location.